package com.self.raft;

import java.util.ArrayList;
import java.util.List;

public class RaftMain {

    public static void main(String[] args) {

        int nodes = 5;
        List<Peer> all = new ArrayList<>(nodes);
        for (int i = 0; i< nodes;i++) {
            Peer peer = new Peer(i+1,all);
            all.add(peer);
        }

        for (Peer peer : all) {
            peer.start();
        }

    }
}
